//
//  RegisterViewController.m
//  ToYourHeartNews
//
//  Created by XJing on 16/1/20.
//  Copyright © 2016年 www.lanou3g.com 蓝鸥. All rights reserved.
//

#import "RegisterViewController.h"

@interface RegisterViewController ()

@end

@implementation RegisterViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.navigationItem.title  = @"注册";
    UITextField *username = [[UITextField alloc]initWithFrame:CGRectMake(60, 100, 250, 30)];
    username.placeholder = @"请输入用户名";
    username.borderStyle = UITextBorderStyleRoundedRect;
    [self.view addSubview:username];
    [username release];
    
    UITextField *pwd = [[UITextField alloc]initWithFrame:CGRectMake(60, 160, 250, 30)];
    pwd.placeholder = @"请输入密码";
    pwd.borderStyle = UITextBorderStyleRoundedRect;
    [self.view addSubview:pwd];
    [pwd release];
    
    UITextField *repwd = [[UITextField alloc]initWithFrame:CGRectMake(60, 220, 250, 30)];
    repwd.placeholder = @"请确认密码";
    repwd.borderStyle = UITextBorderStyleRoundedRect;
    [self.view addSubview:repwd];
    [repwd release];
    
    UIButton *registerLogin = [UIButton buttonWithType:UIButtonTypeSystem];
    registerLogin.frame = CGRectMake(140, 270, 90, 60);
    [registerLogin setTitle:@"注册" forState:UIControlStateNormal];
    [registerLogin addTarget:self action:@selector(registerAction) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:registerLogin];
    [registerLogin release];
    
//    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithTitle:@"Cancel" style:UIBarButtonItemStylePlain target:self action:@selector(returnAction)];
}
-(void)registerAction
{
    NSLog(@"注册成功");
}
-(void)returnAction
{
    [self.navigationController popToRootViewControllerAnimated:YES];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
